home *** CD-ROM | disk | FTP | other *** search
/ Aminet 41 / Aminet 41 (2001)(Schatztruhe)[!][Feb 2001].iso / Aminet / dev / c / libiconv_src.lha / Makefile.devel < prev    next >
Encoding:
Makefile  |  2000-11-07  |  2.8 KB  |  87 lines

  1. # This is the developer's makefile, not the user's makefile.
  2. # Don't use it unless you know exactly what you do!
  3.  
  4. SHELL = /bin/sh
  5. MAKE = make
  6. GPERF = gperf
  7. CC = gcc
  8. CFLAGS = -O
  9. CP = cp
  10. RM = rm -f
  11.  
  12.  
  13. all : configures src/config.h.msvc include/iconv.h.msvc-static include/iconv.h.msvc-shared src/aliases.h src/aliases_aix.h src/flags.h src/translit.h
  14.  
  15.  
  16. # Before making a new release:
  17. # - check that the encoding lists in README and man/iconv_open.3 are up to date,
  18. # - increment the version number in include/iconv.h.in and README
  19. #   and windows/iconv.rc,
  20. # - update the version info in src/Makefile.in,
  21. # - do "make -f Makefile.devel".
  22.  
  23.  
  24. CONFIGURES = configure
  25. CONFIGURES_IN = configure.in
  26.  
  27. CLISP_DIR = ..
  28. ACLOCAL = $(CLISP_DIR)/src/autoconf/aclocal.m4
  29. ACSELECT = $(CLISP_DIR)/src/autoconf/acselect
  30. OTHERMACROS = $(CLISP_DIR)/src/autoconf/libtool.m4
  31.  
  32. autoconf/aclocal.m4 : $(ACLOCAL)
  33.     ($(ACSELECT) `cat $(CONFIGURES_IN) | grep '^[A-Z][A-Z]_' | sed 's,[^A-Z_].*$$,,g' | sort | uniq` < $(ACLOCAL) ; cat $(OTHERMACROS) | sed -e 's,AC_CANONICAL_HOST,CL_CANONICAL_HOST,g' -e 's,AC_PROG_RANLIB,CL_PROG_RANLIB,g' -e 's,AC_PROG_LN_S,CL_PROG_LN_S,g') > autoconf/aclocal.m4
  34.  
  35. configures : $(CONFIGURES)
  36.  
  37. AUTOCONF_FILES = autoconf/aclocal.m4 autoconf/acgeneral.m4 autoconf/acspecific.m4
  38.  
  39. configure : configure.in $(AUTOCONF_FILES)
  40.     autoconf/autoconf -m autoconf
  41.  
  42. check-configures : $(CONFIGURES)
  43.     set -e; for f in $(CONFIGURES); do bash -x -n $$f; done
  44.  
  45.  
  46. src/config.h.msvc : src/config.h.in
  47.     sed -e 's/#undef WORDS_LITTLEENDIAN$$/#define WORDS_LITTLEENDIAN 1/' < $< > $@
  48.  
  49. include/iconv.h.msvc-static : include/iconv.h.in
  50.     sed -e 's/@ICONV_CONST@/const/g' < $< > $@
  51.  
  52. include/iconv.h.msvc-shared : include/iconv.h.in windows/dllexport.h
  53.     sed -e 's/@ICONV_CONST@/const/g' -e 's/extern \([^"]\)/extern LIBICONV_DLL_EXPORTED \1/' -e '/_LIBICONV_VERSION/r windows/dllexport.h' < $< > $@
  54.  
  55.  
  56. # We use "-7" to make a smaller table, but use "unsigned char" array indices
  57. # to avoid gcc warning.
  58. src/aliases.h : src/aliases.gperf
  59.     $(GPERF) -t -L ANSI-C -H aliases_hash -N aliases_lookup -7 -C -k '1,3-11,$$' -i 1 src/aliases.gperf | sed -e 's/\[str/\[(unsigned char) str/' > tmp.h
  60.     $(CP) tmp.h src/aliases.h
  61.     $(RM) tmp.h
  62.  
  63. src/aliases.gperf : src/encodings.def src/genaliases.c
  64.     $(CC) $(CFLAGS) src/genaliases.c -o genaliases
  65.     ./genaliases > src/aliases.gperf
  66.     $(RM) genaliases
  67.  
  68. src/aliases_aix.h : src/encodings_aix.def src/genaliases2.c
  69.     $(CC) $(CFLAGS) -DUSE_AIX src/genaliases2.c -o genaliases
  70.     ./genaliases > src/aliases_aix.h
  71.     $(RM) genaliases
  72.  
  73.  
  74. src/flags.h : src/encodings.def src/encodings_aix.def src/converters.h src/genflags.c
  75.     $(CC) $(CFLAGS) src/genflags.c -o genflags
  76.     ./genflags > src/flags.h
  77.     $(RM) genflags
  78.  
  79.  
  80. src/translit.h : src/translit.def src/gentranslit.c
  81.     $(CC) $(CFLAGS) src/gentranslit.c -o gentranslit
  82.     ./gentranslit < src/translit.def > src/translit.h
  83.     $(RM) gentranslit
  84.  
  85.  
  86. force :
  87.